package com.lagou.rpc.provider.config;

import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import org.I0Itec.zkclient.ZkClient;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * @Authther: mrwu
 * @date:2021/4/6-04
 * @Description:com.lagou.rpc.provider.config
 */
@Component
public class RpcConfig {

    @Bean("bossGroup")
    public EventLoopGroup bossGroup(){
        return new NioEventLoopGroup(1);
    }
    @Bean("workerGroup")
    public EventLoopGroup workerGroup(){
        return  new NioEventLoopGroup();
    }
    @Bean
    public ZkClient zkClient(){
        return new ZkClient("127.0.0.1:2181");
    }

}
